package com.gragra.wilsHandler.tests;
import static org.junit.Assert.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import org.junit.Test;
import com.gragra.wilsHandler.EvaluateDependencyMicroAveraged;
/**
 * 
 * @author Christoph Teichmann
 * 26.09.2013
 */
public class TestEvaluateDependency
{
	@Test
	public void testMain() throws IOException
	{
		StringReader sr = new StringReader("\n2 3 4 5 0\n\n2 0 2 2 3");
		BufferedReader gold = new BufferedReader(sr);
		sr = new StringReader("\n5 1 2 3 0\n\n2 0 2 2 3 ");
		BufferedReader br = new BufferedReader(sr);
		double[] a = EvaluateDependencyMicroAveraged.main(gold, br);
		assertEquals(a[0],0.6,0.00001);
		assertEquals(a[1],0.9,0.0001);
	}
}